﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data;

/// <summary>
/// Summary description for BUS_Teacher
/// </summary>
public class BUS_Teacher : DAL_Teacher
{
    DataTable dtCD = new DataTable();

    public DataTable Teacher_getDK(string id)
    {
        try
        {
            dtCD = DAL_Teacher_getDK(id);
        }
        catch
        {
        }
        return dtCD;
    }
    //moi them
    public DataTable Teacher_getAllData()
    {
        try
        {
            dtCD = DAL_Teacher_getAllData();
        }
        catch
        {
        }
        return dtCD;
    }
    //moi them
    public Boolean Teacher_addtodel(int id)
    {
        try
        {
            DAL_Teacher_addtodel(id);
        }
        catch
        {
            return false;
        }
        return true;
    }
    public Boolean Teacher_del()
    {
        try
        {
            DAL_Teacher_del();
        }
        catch
        {
            return false;
        }
        return true;
    }
    public DataTable Teacher_getAllByPid(int Pid)
    {
        try
        {
            dtCD = DAL_Teacher_getAllByPid(Pid);
        }
        catch
        {
        }
        return dtCD;
    }
    public Boolean Teacher_Insert(DTO_Teacher objC)
    {
        try
        {

            if (DAL_Teacher_Insert(objC))
            {
                return true;
            }
            else
            {
                return false;
            }
        }
        catch
        {
            return false;
        }
    }
    public Boolean Teacher_Update(DTO_Teacher objP)
    {
        try
        {

            if (DAL_Teacher_Update(objP))
            {
                return true;
            }
            else
            {
                return false;
            }
        }
        catch
        {
            return false;
        }
    }
    public DataTable Teacher_getSearch(string teacherid, string fullname, string adress)
    {
        try
        {
            dtCD = DAL_Teacher_getSearch(teacherid, fullname, adress);
        }
        catch
        {
        }
        return dtCD;
    }
    public DataTable Teacher_Login(string where)
    {
        try
        {
            dtCD = DAL_Teacher_Login(where);
        }
        catch
        {
        }
        return dtCD;
    }
    public Boolean Teacher_UpdatePassword(DTO_Teacher obj)
    {
        try
        {

            if (DAL_Teacher_UpdatePassword(obj))
            {
                return true;
            }
            else
            {
                return false;
            }
        }
        catch
        {
            return false;
        }
    }
}